﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed

#pragma once

#include "OwnerPtr.h"
#include "BoxRTree.h"

namespace gcmp
{
    class IProject;
    class IDistance;
    class IBodyTopologyOperate;
    class ISurfaceOperate;
    class IPolygonOperate;
    class IPositionJudge;
    class ICurveOperate;
    class IDiscretize;
    class IIntersect;
    class IContourGenerate;
    class IOffset;
    class IProperty;
    class IExtremum;
    class IExtend;
    class IMeshOperate;
    class IMeshToleranceOperate;
    class IConvertParameter;
    class IHiddenLineRemoval;
    class IFillet2d;
    class IHLRAcc;

    class IAlgorithmFactory
    {
    public:
        virtual ~IAlgorithmFactory() {};

        
        /// \brief 产生投影操作
        virtual OwnerPtr<IProject> CreateProject() const = 0;


        
        /// \brief 产生距离计算操作
        virtual OwnerPtr<IDistance> CreateDistance() const = 0;

        
        /// \brief 产生求交操作
        virtual OwnerPtr<IIntersect> CreateIntersect() const = 0;

        
        /// \brief 产生体的拓扑操作
        virtual OwnerPtr<IBodyTopologyOperate> CreateBodyTopologyOperate() const = 0;

        /// \brief 产生体的拓扑操作
        virtual OwnerPtr<ISurfaceOperate> CreateSurfaceOperate() const = 0;

        /// \brief 产生Polygon的拓扑操作
        virtual OwnerPtr<IPolygonOperate> CreatePolygonTopologyOperate() const = 0;

         
        /// \brief 产生位置判断操作
        virtual OwnerPtr<IPositionJudge> CreatePositionJudge() const = 0;

        
        /// \brief 产生曲线相关的操作
        virtual OwnerPtr<ICurveOperate> CreateCurveOperate() const = 0;

        
        /// \brief 产生几何元素（线、面、体）离散操作
        virtual OwnerPtr<IDiscretize> CreateDiscretize() const = 0;
        
        
        /// \brief 产生偏置操作
        virtual OwnerPtr<IOffset> CreateOffset() const = 0;

        
        /// \brief 产生体轮廓生成接口
        virtual OwnerPtr<IContourGenerate> CreateContourGenerate() const = 0;

        
        /// \brief 几何属性计算操作
        virtual OwnerPtr<IProperty> CreateProperty() const = 0;

        
        /// \brief 极值计算操作
        virtual OwnerPtr<IExtremum> CreateExtremum() const = 0;

        
        /// \brief 延伸计算操作
        virtual OwnerPtr<IExtend> CreateExtend() const = 0;

        /// \brief 网格操作
        virtual OwnerPtr<IMeshOperate> CreateMeshOperate() const = 0;

        /// \brief 网格容差操作
        virtual OwnerPtr<IMeshToleranceOperate> CreateMeshToleranceOperate() const = 0;
        
        /// \brief 参数转换操作
        virtual OwnerPtr<IConvertParameter> CreateConvertParameter() const = 0;

        /// \breif 消隐操作
        virtual OwnerPtr<IHiddenLineRemoval> CreateHiddenLineRemoval() const = 0;

        /// \breif 倒圆角操作
        virtual OwnerPtr<IFillet2d> CreateFillet2d() const = 0;

        /// \brief  创建3维的包围盒rtree树
        /// \param dist     容差
        /// \return   3维的包围盒rtree树
        virtual OwnerPtr<BoxRTree<Box3d>> CreateBox3dRTree(double dist) const = 0;

        // \brief  创建2维的包围盒rtree树
        /// \param dist     容差
        /// \return  2维的包围盒rtree树
        virtual OwnerPtr<BoxRTree<Box2d>> CreateBox2dRTree(double dist) const = 0;

        /// \breif HLRAcc操作
        virtual OwnerPtr<IHLRAcc> CreateHLRAcc()const = 0;
    };
}
